<!DOCTYPE html><html><head><title>Backbone View Test</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script src="../../lib/jquery.min.js"></script><script src="../../lib/underscore.js"></script><script src="../../lib/backbone.js"></script></head><body><div id="list" title="列表" style="color:red" class="listview">列表</div><script type="text/javascript">var ListView = Backbone.View.extend({
    el:'#list'
});
var listview = new ListView();

var ListView2 = Backbone.View.extend({
    tagName : 'div',
    className : 'listview',
        id : 'list',
        attributes : {
            title : '列表',
            style : 'color:red'
    },
    render : function() {
        this.el.innerHTML = 'Hello World!';
            document.body.appendChild(this.el);
    }
});
var listview2 = new ListView2();
listview2.render();

var SearchView = Backbone.View.extend({
    initialize: function () {
        alert('init a SearchView');
    }
});
var searchView = new SearchView({el: $("#search_container")});</script></body></html>